<?php

namespace App\Http\Requests\Admin\V1;

class LoginLoginRequest extends FormRequest
{
    /**
     * @return \string[][]
     * @author 陈文小超
     * @maxim from专注to执行
     * @time 2021/3/24/11:16
     */
    public function rules()
    {
        return [
            'username' => ['bail', 'required', 'alpha_dash', 'between:5,32'],
            'password' => ['bail', 'required', 'alpha_dash', 'between:6,32'],
        ];
    }

    /**
     * @return array
     * @author 陈文小超
     * @maxim from专注to执行
     * @time 2021/3/24/11:16
     */
    public function messages()
    {
        return [
            'username.*' => trans('admin/v1/request.login.username'),
            'password.*' => trans('admin/v1/request.login.password')
        ];
    }
}
